import request from '@/utils/request'

export default{
  getTeachers() {
    return request({
      url: '/admin/edu/teacher/list',
      method: 'get'
    })
  },
  deleteTeacher(id) {
    return request({
      url: `/admin/edu/teacher/delete/${id}`,
      method: 'delete'
    })
  },
  getTeacherPage(pageNum, pageSize, queryObj) {
    return request({
      url: `/admin/edu/teacher/list/${pageNum}/${pageSize}`,
      method: 'get',
      params: queryObj
    })
  },
  batchDel(ids) {
    return request({
      url: '/admin/edu/teacher/batchDel',
      method: 'delete',
      data: ids
    })
  },
  saveTeacher(teacher) {
    return request({
      url: '/admin/edu/teacher/save',
      method: 'post',
      data: teacher
    })
  },
  getTeacherById(id) {
    return request({
      url: `/admin/edu/teacher/get/${id}`,
      method: 'get'
    })
  },
  updateTeacher(teacher) {
    return request({
      url: '/admin/edu/teacher/update',
      method: 'put',
      data: teacher
    })
  }
}
